# -*- coding: utf-8 -*-

"""
@contact:  1
@file: example.py
@time: 2025/10/22 14:41
@author: LDC
"""
from simple_math import add, sub, mul, div


def main():
    '''
    数学运算功能使用示例
    :return:
    '''
    print("***math_ops 包使用示例***")
    print('数学运算')
    print(f'2 + 3 = {add(2, 3)}')
    print(f'6 - 3 = {sub(6, 3)}')
    print(f'3 * 3 = {mul(3, 3)}')
    print(f'6 / 3 = {div(6, 3)}')

    print('错误处理')
    try:
        result = div(3, 0)
        print(f'5 / 0 = {result}')
    except ZeroDivisionError as e:
        print(f'错误：{e}')


if __name__ == '__main__':
    main()
